﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace myNico.view
{
    /// <summary>
    /// w_config.xaml 的交互逻辑
    /// </summary>
    public partial class w_config : Window
    {
 
        public w_config()
        {
            InitializeComponent();
            if (Mode.app_data.ProxyIp != null && Mode.app_data.ProxyPort != null)
            {
                txt_ip.Text = Mode.app_data.ProxyIp;
                txt_Port.Text = Mode.app_data.ProxyPort.ToString();
            }
        }

        private void btm_ok_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;   
        }

        private void btm_cance_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void cb_qiy_Click(object sender, RoutedEventArgs e)
        {
            if (cb_qiy.IsChecked !=true)
            {
                txt_ip.Text = "";
                txt_Port.Text = "";
            }
        }
    }
}
